<?php

class sfGuardFormSignin extends sfForm
{
  public function configure()
  {
    $this->setWidgets(array(
      'username' => new sfWidgetFormInput(),
      'password' => new sfWidgetFormInput(array('type' => 'password')),
      'remember' => new sfWidgetFormInputCheckbox(),
    ));
    $this->widgetSchema->setLabel('username','Usuario');
    $this->widgetSchema->setLabel('password','Contraseña');
    $this->widgetSchema->setLabel('remember','Recordar Usuario?');
    $this->setValidators(array(
      'username' => new sfValidatorString(array(),array('required'=>'Campo Obligatorio')),
      'password' => new sfValidatorString(array(),array('required'=>'Campo Obligatorio')),
      'remember' => new sfValidatorBoolean(),
    ));
    

    $this->validatorSchema->setPostValidator(new sfGuardValidatorUser());

    $this->widgetSchema->setNameFormat('signin[%s]');
  }
}
